<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>票</title>
    <link rel="stylesheet" href="/static/css/style.css">
    <script src="/static/script/jquery-1.7.2.js"></script>
    <script>
        $(function (){
            $("#return").click(function (){
                location = "/login";
            });
        });
    </script>
</head>
<body>

<div id="login_page">
    <div class="logo" style="color: #39987c;"><img alt="" src="{{.User.ImgPath}}" style="width: 50px;height: 50px;border-radius: 50px;border: 2px solid darkblue;">{{.User.Username}}</div>
    <div id="films">
        <div id="main">
            {{range .Tickets}}
                <table style="border: 1px solid black;margin: auto;margin-top: 35px;width: 80%">
                    <tr>
                        <td>票ID：{{.ID}}</td>
                        <td colspan="2"><span style="float: right">订单编号：{{.OrderID}}</span></td>
                    </tr>
                    <tr>
                        <td colspan="2">电影名称：{{.FilmName}}</td>
                        <td>座位：{{.Col}}行{{.Row}}列</td>
                    </tr>
                    <tr>
                        <td>日期：{{.Date}}</td>
                        <td>开场时间：{{.StartTime}}</td>
                        <td>散场时间：{{.EndTime}}</td>
                    </tr>
                    <tr>
                        <td>售价：{{.Price}}</td>
                        {{if .State}}
                        <td>票的状态：<span style="color: red">已失效</span></td>
                        {{else}}
                        <td>票的状态：<span style="color: green">有效</span></td>
                        {{end}}
                        <td>交易时间：{{.OrderTime}}</td>
                    </tr>
                </table>
            {{end}}
        </div>
        <input type="button" value="返回" id="return">
    </div>
</div>
</body>
</html>
</body>
</html>